package com.demo.swingquickticket.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class RegUtil {

    public static String regString(String source, String regStr) {
        Pattern pattern = Pattern.compile(regStr);
        Matcher matcher = pattern.matcher(source);
        if (matcher.find()) {
            return matcher.group();
        }
        return null;
    }
}
